import Vue from 'vue'
import App from './App'
import Http from '@/common/request'

import store from './store'

Vue.config.productionTip = false

Vue.prototype.$store = store
Vue.prototype.$http = Http
Vue.prototype.$toast = function (options = {}) {
  if (typeof options === 'string') {
    options = {
      title: options
    }
  }
  return uni.showToast({
    ...options,
    icon: 'none'
  })
}

App.mpType = 'app'

const app = new Vue({
  store,
  ...App
})
app.$mount()